package com.globallogic.university.people;

import org.testng.Assert;
import org.testng.annotations.Test;

public class StudentGroupTest {
	
	@Test
	public void shouldAddStudentGroup() {
		// given
		String expected = "Group1";
		
		// when
		StudentGroup group = new StudentGroup(expected);

		// then
		Assert.assertEquals(group.getGroupId(), expected);
	}
	
	@Test
	public void shouldAddStudentsToGroup() {
		// given
		Student student = new Student("John", "Doe");
		StudentGroup group = new StudentGroup("Group1");
		
		// when
		group.enrollStudent(student);

		// then
		Assert.assertTrue(group.getEnrolledStudents().contains(student));
	}

}
